package com.apes.fn.server.productRequireManage.service;

import com.alibaba.fastjson.JSONObject;
import com.apes.fn.server.productRequireManage.model.RequireAccept;
import com.apes.fn.server.productRequireManage.model.ReplenishmentBusinessImp;
import com.apes.framework.api.SpringManager;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("repleAcceptEntranceService")
public class RepleAcceptEntranceService implements RequireAccept{

    public void thirdCreatePurOrderRequestIssue(JSONObject obj, String serviceId) {
        ReplenishmentBusinessImp imp = SpringManager.getBean(serviceId);
        this.acceptOrder(imp, obj);
    }

    @Override
    public Map acceptOrder(ReplenishmentBusinessImp replenishmentBusinessImp, JSONObject data) {
        return replenishmentBusinessImp.sendOrder(data);
    }

    @Override
    public JSONObject acceptOrderSum(ReplenishmentBusinessImp replenishmentBusinessImp, JSONObject data) {
        return replenishmentBusinessImp.sumRequireItem(data);
    }
}
